import { Navigate } from "react-router-dom";
import HomePage from "@/pages/home";
import LoginPage from "@/pages/login";
import NotFoundPage from "@/pages/404";

// 配置路由映射 （不同的路由对应渲染不同的页面组件）
const router = [
  {
    path: "/",
    element: <Navigate to="/home" />,
  },
  {
    path: "/home",
    name: "Home",
    meta: {
      title: "首页",
      key: "0",
      isHide: false,
      icon: "home",
    },
    element: <HomePage />,
  },

  {
    path: "/login",
    name: "Login",
    element: <LoginPage />,
  },
  {
    path: "*",
    element: <NotFoundPage />,
  },
];

export default router;
